#include <stdio.h>
int main(){
    printf("input a number for loop:");
    int num=0;
    scanf("%d",&num);
    int sum=0,i=1;
    while(i<=num){
        sum+=i;
        i++;
    }
    printf("sum=%d",sum);
}